#ifndef _C2QUEUE

#define _C2QUEUE

/*
*
 * Author: Joseph Conrad Stack (unityid: jcstack)
 * 
 * Program 8
 * 
 * this the second queue project, which can keep track of a finite number of 
 * customers in a linked list queue.
 */ 



#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
#include <string.h>
#include <fcntl.h>


struct Customer{
    int id;
    char first[50];
    char last[50];
    struct Customer* next_ptr;
};

/*
*
 * purpose: adds a customer to the queue
 * parameters: cust is the customer to be added to the queue
 * returns: returns 1 if successful, 0 if not successful
 * side-effects: none expected
 * sample-call: addCust(temp) -> returns 1 //adds customer to the queue
 */
int addCust(struct Customer* cust);


/*
*
 * purpose: removes the first customer in the queue
 * parameters: none
 * returns: returns the next customer in line
 * side-effects: none expected
 * sample-call: remCust() -> sets the new head to the next Customer in line
 */
struct Customer* remCust();



/*
*
 * purpose: to return the number of customers in the que
 * parameters: none
 * returns: returns the number of customers currently in the queue
 * side-effects: none expected
 * sample-call: countCust() -> 2 , if there are 2 customers in the queue
 */
int countCust();





/*
*
 * purpose: loads the current customer queue list to file queue.dat
 * parameters: none
 * returns: returns 1 if successful, 0 if unsuccessful
 * side-effects: none expected
 * sample-call: saveData() -> should save the current customer list in to queue.dat
 */
int saveData();




/*
*
 * purpose: reads customer queue from queue.dat and loads it.
 * parameters: none
 * returns: returns 1 if successful, 0 if unsuccessful
 * side-effects: none expected
 * sample-call: loadData() -> should load queue.dat information into queue
 */
int loadData();





/*
*
 * purpose: checks to see if an input id currently exists in the queue
 * parameters: none
 * returns: returns -1 if the id exists, 0 if it doesn't exist
 * side-effects: none expected
 * sample-call: idCheck(15) -> if 15 doesn't exist, returns 0
 */
int idCheck(int id);



/*
*
 * purpose: starts program, comments on valid/invalid commands, tells whether queue.dat was loaded
 * parameters: none
 * returns: returns exit_failure if data doesn't save correctly, exit_success otherwise
 * side-effects: none expected
 * sample-call: int main() -> is started when program is called
 */
int main();
#endif

